package com.ys.controller;

import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by yangshuang on 2017/4/18.
 */

@RestController
@RequestMapping(value = "/helloController")
public class HelloController {


    @GetMapping(value = "/hello/{id}")
    @ResponseBody
    public String say(@PathVariable(value = "id") Integer id, HttpServletRequest request) {
        String parameter = request.getParameter("id");
        return "请求的参数是。。。id";
    }
    @RequestMapping(value = {"/index", "/helloIndex"}, method = RequestMethod.GET)
    public String index() {
        return "index";
    }
}
